﻿Imports DevExpress.Utils
Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Controls
Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace IControls
    Public Class ICalcEdit
        Inherits CalcEdit
        ' Methods
        Public Sub New()
            MyBase.SetStyle(ControlStyles.UserPaint, True)
            MyBase.UpdateStyles()
            Me.EnterMoveNextControl = True
            MyBase.Properties.AllowNullInput = DefaultBoolean.True
            Me.BorderStyle = BorderStyles.NoBorder
            Me.InitializeComponent()
        End Sub

        Public Sub New(ByVal container As IContainer)
            container.Add(Me)
            MyBase.SetStyle(ControlStyles.UserPaint, True)
            MyBase.UpdateStyles()
            Me.EnterMoveNextControl = True
            MyBase.Properties.AllowNullInput = DefaultBoolean.True
            Me.InitializeComponent()
        End Sub

        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            If (disposing AndAlso (Not Me.components Is Nothing)) Then
                Me.components.Dispose()
            End If
            MyBase.Dispose(disposing)
        End Sub

        Private Sub InitializeComponent()
            Me.components = New Container
        End Sub

        Protected Overrides Sub OnPaint(ByVal pe As PaintEventArgs)
            MyBase.OnPaint(pe)
            ControlPaint.DrawBorder(pe.Graphics, pe.ClipRectangle, MyBase.Parent.BackColor, 0, ButtonBorderStyle.Solid, MyBase.Parent.BackColor, 0, ButtonBorderStyle.Solid, MyBase.Parent.BackColor, 0, ButtonBorderStyle.Solid, Color.Black, 1, ButtonBorderStyle.Dotted)
        End Sub


        ' Fields
        Private components As IContainer
    End Class
End Namespace

